package com.hl.card.common.remote.user;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient(value = "USER-CENTER",url = "localhost:8281")
@FeignClient(value = "USER-CENTER")
public interface RemoteUserService {
    @RequestMapping(value = "/center/a",method = RequestMethod.GET)
    String sayHiFromClientOne(@RequestParam(value = "a") String a);
    @RequestMapping(value = "/center/regBlank",method = RequestMethod.POST)
    JSONObject regSsoUser(@RequestParam(value = "phone") String phone, @RequestParam(value = "phoneCode") String phoneCode);
    @RequestMapping(value = "/center/register",method = RequestMethod.POST)
    JSONObject register(@RequestParam(value = "mobilePhone") String mobilePhone, @RequestParam(value = "loginPwd") String loginPwd, @RequestParam(value = "phoneCode") String phoneCode);
    @RequestMapping(value = "/center/getUserInfoByPhone",method = RequestMethod.GET)
    JSONObject findSsoUserByPhone(@RequestParam(value = "mobile") String mobile);
    @RequestMapping(value = "/center/getUserInfoById",method = RequestMethod.GET)
    JSONObject findSsoUserByUserId(@RequestParam(value = "userId") String userId);
    @RequestMapping(value = "/center/setBlankPassword",method = RequestMethod.POST)
    JSONObject setSsoUserPasswordByPhone(@RequestParam(value = "mobile") String mobile, @RequestParam(value = "code") String code);
    @RequestMapping(value = "/center/login",method = RequestMethod.POST)
    Object login(@RequestParam(value = "loginAccount") String loginAccount, @RequestParam(value = "loginPwd") String loginPwd,
                 @RequestParam(value = "gustId") String gustId, @RequestParam(value = "vrifyCode") String vrifyCode);
    @RequestMapping(value = "/center/checkVerifyCode",method = RequestMethod.GET)
    JSONObject checkImageCode(@RequestParam(value = "gustId") String gustId, @RequestParam(value = "verifyCode") String verifyCode);
    //自定义手机验证码：(code:0 成功 1失败 过期时间10分钟)
    @RequestMapping(value = "/center/sendPCode",method = RequestMethod.GET)
    JSONObject sendPCode(@RequestParam(value = "phoneNum") String phoneNum, @RequestParam(value = "code") String code);
    //发送手机验证码：（code:0成功 1失败 过期时间：24 * 60 * 60 秒）
    @RequestMapping(value = "/center/sendPhoneCode",method = RequestMethod.GET)
    JSONObject sendPCode(@RequestParam(value = "phoneNum") String phoneNum);
    //验证手机验证码：（code:0 成功 1 验证码错误 2 手机号不能为空，3验证码不能为空）
    @RequestMapping(value = "/center/vrifyPhoneCode",method = RequestMethod.GET)
    JSONObject vrifyPhoneCode(@RequestParam(value = "phoneNum") String phoneNum, @RequestParam(value = "code") String code);

}
